﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace cc
{
    class Trigonometric: Calkulator
    {
        public double sin()
        {
            double operant;
            operant = Math.Sin(Math.PI * operant1 / 180);
            return operant;
        }

        public double cos()
        {
            double operant;
            operant = Math.Cos(Math.PI * operant1 / 180);
            return operant;
        }

        public double tg()
        {
            double operant;
            if (operant1 != 90)
            operant = Math.Tan(Math.PI * operant1 / 180);
            else
            {
                operant1 = -2;
                operant2 = -1;
                operant = 0;
                //operant = Convert.ToDouble(ConsoleKey.End);
            }
            return operant;
        }

      

        public void t_equally(string a)
        {
            if (a == "sin")
                rezult = sin();
            if (a == "cos")
                rezult = cos();
            if (a == "tg")
                rezult = tg();
         

        }

    }
}
